<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');?>
<?php $this->load->view('common/head');?>

<?php $this->load->view('common/header');?>
<div class="main-container" id="main-container">
    <script type="text/javascript">
        try {
            ace.settings.check('main-container', 'fixed')
        } catch (e) {
        }
    </script>

    <?php $this->load->view('common/sidebar');?>
    <div class="main-content">
        <div class="main-content-inner">
            <!-- #section:basics/content.breadcrumbs -->
            <?php $this->load->view('common/breadcrumbs');?>

            <!-- /section:basics/content.breadcrumbs -->
            <div class="page-content">

                <?php $this->load->view('common/set');?>

                <!-- /section:settings.box -->
                <div class="row">
                    <div class="cf">
                    <a class="btn btn-info pull-left" href="<?php echo site_url(X_URL.'webcity/add') ?>" value="">新增</a>
                    </div>
                    <div class="space-4"></div>
                    <!-- <form id="form" method="post" action="<?php echo site_url(X_URL.'webcity/dels');?>"> -->
                        <table class="table table-striped table-bordered">
                            <thead>
                            <tr>
                                <th class="center"><input class="check-all" type="checkbox" value=""></th>
                                <th>城市ID</th>
                                <th>城市名称</th>
                                <th>标识</th>
                                <th class="center">标题/名称</th>
                                <th>联络人</th>
                                <th>电话</th>
                                <th>地址</th>
                                <th>运营级别</th>
                                <th>加入时间</th>
                                <th class="center">操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <?php if($webcity) ?>
                            <?php foreach ($webcity as $key => $val) { ?>
                                <tr>
                                    <td class="center"><input class="ids" type="checkbox" name="ids[]" value="<?php echo $val['city_id'] ?>"></td>
                                    <td><?php echo $val['city_id']; ?></td>
                                    <td><?php echo $val['city_name']; ?></td>
                                    <td><?php echo $val['city_url']; ?></td>
                                    <td><?php echo $val['city_company']; ?></td>
                                    <td><?php echo $val['city_uname']; ?></td>
                                    <td><?php echo $val['city_tel']; ?></td>
                                    <td><?php echo $val['city_dress']; ?></td>
                                    <td><?php echo $val['city_type']; ?></td>
                                    <td><?php echo date("Y-m-d",$val['city_time']); ?></td>
                                    <td class="center">
                                        <a href="<?php echo site_url(X_URL.'webcity/edit/'.$val['city_id']);?>">修改</a>&nbsp;
                                            </a>&nbsp;<a
                                                    class="del" href="javascript:;" val="<?php echo site_url(X_URL.'webcity/del/'.$val['city_id']);?>">删除</a>
                                    </td>
                                </tr>
                            <?php }?>
                            </tbody>
                        </table>
                        <!-- </form>
                        <div class="cf">
                                <input id="submit" class="btn btn-info" type="button" value="删除">
                            </div> -->
<!--                        {$page}-->
                        <!-- PAGE CONTENT ENDS -->
                    </div><!-- /.col -->
                </div><!-- /.row -->
            </div><!-- /.page-content -->
    </div><!-- /.main-content -->

</div>
<?php $this->load->view('common/footer');?>


<?php $this->load->view('common/footerjs');?>
<!-- inline scripts related to this page -->
<script type="text/javascript">

    $(function () {
        $("#officialnews ul").html('<div class="ace-icon fa fa-spinner fa-spin orange"></div>');
    })
    $("#adduser").click(function () {
        window.location.href="add";
    });
    $(".del").click(function () {
            var url = $(this).attr('val');
            bootbox.confirm({
                title: "系统提示",
                message: "确定要删除?",
                callback: function (result) {
                    if (result) {
                        window.location.href = url;
                    }
                },
                buttons: {
                    "cancel": {"label": "取消"},
                    "confirm": {
                        "label": "确定",
                        "className": "btn-danger"
                    }
                }
            });
        });
    // $("#submit").click(function () {
    //         bootbox.confirm({
    //             title: "系统提示",
    //             message: "确定要删除所选？",
    //             callback: function (result) {
    //                 if (result) {
    //                     $("#form").submit();
    //                 }
    //             },
    //             buttons: {
    //                 "cancel": {"label": "取消"},
    //                 "confirm": {
    //                     "label": "确定",
    //                     "className": "btn-danger"
    //                 }
    //             }
    //         });
    //     });

</script>
</body>
</html>
